<template>
	<view>
		<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30" style="padding-top: 20rpx;">
			<view class="u-m-r-10">
				<u-avatar :src="apiUrlJF + userInfo.avatar" size="140"></u-avatar>
			</view>
			<view class="u-flex-1">
				<view class="u-font-18 u-p-b-20">{{userInfo.nickName}}</view>
				<view class="u-font-14 u-tips-color">账户:{{userInfo.userName}}</view>
			</view>
			<view class="u-m-l-10 u-p-10">
				<!-- <u-icon name="scan" color="#969799" size="28"></u-icon> -->
			</view>
			<view class="u-m-l-10 u-p-10">
				<u-icon name="arrow-right" color="#969799" size="28"></u-icon>
			</view>
		</view>
		
		<view class="u-m-t-20">
			<u-cell-group>
				<u-cell-item icon="map" title="打卡" @click="clokIn"></u-cell-item>
				<u-cell-item icon="calendar" title="GIS" @click="lookGis"></u-cell-item>
				<u-cell-item icon="calendar" title="我的排班" @click="lookCla"></u-cell-item>
				<u-cell-item icon="info-circle" title="注销登录" @click="logOff"></u-cell-item>
			</u-cell-group>
		</view>
	</view>
	
</template>

<script>
	import tabbar from '../../components/tabbar/index.vue';
	export default {
		components: {
			tabbar
		},
		data() {
			return {
				apiUrlJF: "http://all.roywise.cn:8086/api",
				pic:'https://uviewui.com/common/logo.png',
				userInfo: {},
				show:true
			}
		},
		onLoad() {
			this.userInfo = uni.getStorageSync("userInfo")
		},
		methods: {
			logOff () {
				uni.removeStorageSync("token")
				uni.removeStorageSync("userInfo")
				uni.reLaunch({
					url:'/pages/index/index'
				})
			},
			lookCla () {
				uni.navigateTo({
					url:'/pages/cla/index'
				})
			},
			clokIn () {
				uni.navigateTo({
					url:'/pages/clockin/index'
				})
			},
			lookGis () {
				uni.navigateTo({
					url:'/pages/gis/index'
				})
			}
		}
	}
</script>

<style lang="scss">
page{
	background-color: #ededed;
}

.camera{
	width: 54px;
	height: 44px;
	
	&:active{
		background-color: #ededed;
	}
}
.user-box{
	background-color: #fff;
}
</style>
